package com.mrobuy.jdvc.entity;

import com.gavel.annotation.FieldMeta;
import com.gavel.annotation.TableMeta;
import com.gavel.database.SQLExecutor;

import java.util.ArrayList;
import java.util.List;

@TableMeta(name = "VC_ITEM_EXT_PROP_VALUE", title = "京东类目扩展属性值")
public class VCItemExtPropValue {

    @FieldMeta(name = "ID", title = "ID", length = 32, primary = true)
    private String id;

    @FieldMeta(name = "PRODUCTID", title = "商品ID", length = 32)
    private String productid;

    @FieldMeta(name = "PROPID", title = "扩展属性ID")
    private Integer propid;  // 规格参数ID

    @FieldMeta(name = "PROPNAME", title = "扩展属性", length = 32)
    private String propname;  // 规格参数ID

    @FieldMeta(name = "TYPE", title = "规格参数ID", length = 32)
    private String type;  // 规格参数ID

    // 扩展属性单选或者复选的属性值ID,以英文分号分隔
    @FieldMeta(name = "EXTVALUE", title = "扩展属性单选或者复选的属性值ID,以英文分号分隔", length = 32)
    private String extvalue;  //单选属性值ID

    @FieldMeta(name = "EXTALIAS", title = "单选属性别名", length = 50)
    private String extalias;  // valueId : 700013

    @FieldMeta(name = "EXTREMARK", title = "数值", length = 50)
    private String extremark;  //  valueName : 救生衣

    @FieldMeta(name = "REQUIRED", title = "是否必填", length = 8)
    private String required;  // "required": false,

    private List<VCExtPropValue> options = new ArrayList<>();

    public List<VCExtPropValue> getOptions() {
        return options;
    }

    public void setOptions(List<VCExtPropValue> options) {
        this.options = options;
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProductid() {
        return productid;
    }

    public void setProductid(String productid) {
        this.productid = productid;
    }

    public Integer getPropid() {
        return propid;
    }

    public void setPropid(Integer propid) {
        this.propid = propid;
    }

    public String getPropname() {
        return propname;
    }

    public void setPropname(String propname) {
        this.propname = propname;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getExtvalue() {
        return extvalue;
    }

    public void setExtvalue(String extvalue) {
        this.extvalue = extvalue;
    }

    public String getExtalias() {
        return extalias;
    }

    public void setExtalias(String extalias) {
        this.extalias = extalias;
    }

    public String getExtremark() {
        return extremark;
    }

    public void setExtremark(String extremark) {
        this.extremark = extremark;
    }

    public String getRequired() {
        return required;
    }

    public void setRequired(String required) {
        this.required = required;
    }

    public static void main(String[] args) throws Exception {
        SQLExecutor.createTable(VCItemExtPropValue.class);
    }
}
